<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'hospital-form',
	'enableAjaxValidation'=>true,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
	<?php echo $form->errorSummary($modelAddress); ?>
	

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<fieldset>
	<legend>Address Information</legend>
	<div class="row">
		<?php echo $form->labelEx($modelAddress,'houseNumber'); ?>
		<?php echo $form->textField($modelAddress,'houseNumber',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($modelAddress,'houseNumber'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($modelAddress,'streetName'); ?>
		<?php echo $form->textField($modelAddress,'streetName',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($modelAddress,'streetName'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($modelAddress,'addressLine1'); ?>
		<?php echo $form->textField($modelAddress,'addressLine1',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($modelAddress,'addressLine1'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($modelAddress,'locality'); ?>
		<?php echo $form->textField($modelAddress,'locality',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($modelAddress,'locality'); ?>
	</div>
	
	<div class="column">
		<?php echo $form->labelEx($modelAddress,'country'); ?>
		<?php echo $form->dropDownList($modelAddress, 'country',  
              array('IND' => 'India', 'SL' => 'Srilanka', 'UAE' => 'United Arab Emirates', 'SAUDI' => 'Saudi Arabia', 'OMAN' => 'Oman'),
              array('empty' => 'Select a Country')); ?>	
  		<?php echo $form->error($modelAddress,'country'); ?>
	</div>	
	<div class="column">
		<?php echo $form->labelEx($modelAddress,'postCode'); ?>
		<?php echo $form->textField($modelAddress,'postCode',array('size'=>6,'maxlength'=>6)); ?>
		<?php echo $form->error($modelAddress,'postCode'); ?>	
	</div>
	<div class="column">
		<?php echo $form->labelEx($modelAddress,'city'); ?>
		<?php echo $form->textField($modelAddress,'city',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($modelAddress,'city'); ?>
	</div>





	</fieldset>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'createdBy'); ?>
		<?php echo $form->textField($model,'createdBy',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'createdBy'); ?>
	</div>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'createdTime'); ?>
		<?php echo $form->textField($model,'createdTime'); ?>
		<?php echo $form->error($model,'createdTime'); ?>
	</div>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'updatedBy'); ?>
		<?php echo $form->textField($model,'updatedBy',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'updatedBy'); ?>
	</div>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'updatedTime'); ?>
		<?php echo $form->textField($model,'updatedTime'); ?>
		<?php echo $form->error($model,'updatedTime'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->